package com.ruoyi.dataserver.line.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum LayerxEnum {

    YXX("YXX","有限电视管线","smdtv_58","smdtv_59"),
    XXX("XXX","信息网络管线","smdtv_54","smdtv_55"),
    WSG("WSG","污水管线","smdtv_52","smdtv_53"),
    TRQ("TRQ","天然气管线","smdtv_50","smdtv_51"),
    SSG("SSG","输水管线","smdtv_48","smdtv_49"),
    RSG("RSG","供热管线","smdtv_46","smdtv_47"),
    LDX("LDX","路灯管线","smdtv_44","smdtv_45"),
    JTX("JTX","交通信号管线","smdtv_42","smdtv_43"),
    GDX("GDX","供电管线","smdtv_40","smdtv_41"),
    DTX("DTX","电力通信管线","smdtv_38","smdtv_39"),
    DHX("DHX","电话管线","smdtv_36","smdtv_37"),
    YSG("YSG","雨水管线","smdtv_56","smdtv_57");

    private String code;
    private String description;
    private String lineTableName;
    private String pointTableName;

    public static LayerxEnum getLayerEnumWithCode(String code){
        if (code == null || code.isEmpty()){
            return null;
        }
        for (LayerxEnum layerEnum : LayerxEnum.values()) {
            if (code.equals(layerEnum.getCode())){
                return  layerEnum;
            }
        }
        return null;
    }
}
